{include file="pub_start.htm"}

<body>

<div class="layout_header">
  <div class="header_area">
    <div class="header_top">
      {if $member.iflogin == "1" && $member.mg_ag_id > 0}
      <div class="link">
        <ul>
          <li class="user">{$member.username}</li>
          <li><a href="index.php?act=cp" target="_self">会员中心</a></li>
          <li><a href="index.php?act=login&ope=logout" target="_self">退出</a></li>
          <li><a href="admin.php" target="_blank">[后台管理]</a></li>
        </ul>
      </div>
      {elseif $member.iflogin == "1"}
      <div class="link">
        <ul>
          <li class="user">{$member.username}</li>
          <li><a href="index.php?act=cp" target="_self">会员中心</a></li>
          <li><a href="index.php?act=login&ope=logout" target="_self">退出</a></li>
        </ul>
      </div>
      {elseif $get.act == "login"}
      <div class="link">
        <ul>
          <li><a href="index.php?act=register" title="用户注册">用户注册</a></li>
          <li><a href="index.php?act=login" title="用户注册">用户登录</a></li>
          <li><a href="index.php?act=forgetpass" title="找回密码">找回密码</a></li>
        </ul>
      </div>
      {else}
      <div class="link">
        <ul>
          <li><a href="index.php?act=register" title="用户注册">用户注册</a></li>
          <li><a href="index.php?act=login" title="用户注册">用户登录</a></li>
          <li><a href="index.php?act=forgetpass" title="找回密码">找回密码</a></li>
        </ul>
      </div>
      <div class="login">
        <form id="header_member_login" name="header_member_login" method="post" action="javascript:void(null);" enctype="multipart/form-data">
          <label for="username">会员:</label>
          <input type="text" id="username" name="username" class="input" size="12" style="width:80px;" />
          <label for="password">密码:</label>
          <input type="password" id="password" name="password" class="input" size="12" style="width:80px;" />
          <input type="button" id="header_member_login_submit" name="header_member_login_submit" value="登录" class="button"
            onclick="xajax.$('header_member_login_submit').disabled=true;
                      xajax.$('header_member_login_submit').value='请等待...';
                      xajax_quick_member_login(xajax.getFormValues('header_member_login'), 'header_member_login_submit');">
        </form>
      </div>
      {/if}
    </div>
    <div class="header_logo">
      <h1><a href="http://www.weaverdream.com" title="Weaverdream"><img src="{$dir_images}/logo_firmkernel.gif" border="0" alt="Weaverdream" /></a></h1>
      <span></span>
    </div>
  </div>
  <div class="header_menu">
    <ul>
      {if $get.act == "index" || $get.act == ""}
      <li class="current"><a href="{$control_index}" target="_self">网站首页</a></li>
      {else}
      <li><a href="{$control_index}" target="_self">网站首页</a></li>
      {/if}
      {return_channel_list upper_id="0" if_enable="1" if_show="1" item=menu_main}
      {foreach name=menu_main from=$menu_main item=menu_main}
        {if $menu_main.if_turn == "1"}
          {if $menu_main.if_turn_type == "1"}
          <li {if $menu_main.id == $channel_path.0.id}class="current"{/if}><a href="{$menu_main.if_turn_url}" target="_self">{$menu_main.name}</a></li>
          {elseif $menu_main.if_turn_type == "2"}
          <li {if $menu_main.id == $channel_path.0.id}class="current"{/if}><a href="{$menu_main.if_turn_url}" target="_blank">{$menu_main.name}</a></li>
          {else}
          <li {if $menu_main.id == $channel_path.0.id}class="current"{/if}><a href="{$menu_main.if_turn_url}" target="_blank">{$menu_main.name}</a></li>
          {/if}
        {else}
          <li {if $menu_main.id == $channel_path.0.id}class="current"{/if}><a href="{$control_index}?act=channel&channel_id={$menu_main.id}" target="_self">{$menu_main.name}</a></li>
        {/if}
      {/foreach}
    </ul>
  </div>
</div>
